# Generated from Lua.g4 by ANTLR 4.7
# encoding: utf-8
from antlr4 import *
from io import StringIO
from typing.io import TextIO
import sys

def serializedATN():
    with StringIO() as buf:
        buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3D")
        buf.write("\u018f\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7")
        buf.write("\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4\r\t\r\4\16")
        buf.write("\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22\4\23\t\23")
        buf.write("\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31")
        buf.write("\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36")
        buf.write("\4\37\t\37\4 \t \4!\t!\4\"\t\"\4#\t#\4$\t$\3\2\3\2\3\2")
        buf.write("\3\3\7\3M\n\3\f\3\16\3P\13\3\3\3\5\3S\n\3\3\4\3\4\3\4")
        buf.write("\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3")
        buf.write("\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4")
        buf.write("\7\4s\n\4\f\4\16\4v\13\4\3\4\3\4\5\4z\n\4\3\4\3\4\3\4")
        buf.write("\3\4\3\4\3\4\3\4\3\4\3\4\3\4\5\4\u0086\n\4\3\4\3\4\3\4")
        buf.write("\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3")
        buf.write("\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\5\4\u00a0\n\4\5\4\u00a2")
        buf.write("\n\4\3\5\3\5\5\5\u00a6\n\5\3\5\5\5\u00a9\n\5\3\6\3\6\3")
        buf.write("\6\3\6\3\7\3\7\3\7\7\7\u00b2\n\7\f\7\16\7\u00b5\13\7\3")
        buf.write("\7\3\7\5\7\u00b9\n\7\3\b\3\b\3\b\7\b\u00be\n\b\f\b\16")
        buf.write("\b\u00c1\13\b\3\t\3\t\3\t\7\t\u00c6\n\t\f\t\16\t\u00c9")
        buf.write("\13\t\3\n\3\n\3\n\7\n\u00ce\n\n\f\n\16\n\u00d1\13\n\3")
        buf.write("\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13")
        buf.write("\3\13\3\13\5\13\u00e0\n\13\3\13\3\13\3\13\3\13\3\13\3")
        buf.write("\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13")
        buf.write("\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13")
        buf.write("\3\13\3\13\3\13\3\13\3\13\7\13\u0102\n\13\f\13\16\13\u0105")
        buf.write("\13\13\3\f\3\f\7\f\u0109\n\f\f\f\16\f\u010c\13\f\3\r\3")
        buf.write("\r\6\r\u0110\n\r\r\r\16\r\u0111\3\16\3\16\3\16\3\16\3")
        buf.write("\16\5\16\u0119\n\16\3\17\3\17\3\17\3\17\3\17\3\17\5\17")
        buf.write("\u0121\n\17\3\17\7\17\u0124\n\17\f\17\16\17\u0127\13\17")
        buf.write("\3\20\7\20\u012a\n\20\f\20\16\20\u012d\13\20\3\20\3\20")
        buf.write("\3\20\3\20\3\20\3\20\5\20\u0135\n\20\3\21\3\21\5\21\u0139")
        buf.write("\n\21\3\21\3\21\3\22\3\22\5\22\u013f\n\22\3\22\3\22\3")
        buf.write("\22\5\22\u0144\n\22\3\23\3\23\3\23\3\24\3\24\5\24\u014b")
        buf.write("\n\24\3\24\3\24\3\24\3\24\3\25\3\25\3\25\5\25\u0154\n")
        buf.write("\25\3\25\5\25\u0157\n\25\3\26\3\26\5\26\u015b\n\26\3\26")
        buf.write("\3\26\3\27\3\27\3\27\3\27\7\27\u0163\n\27\f\27\16\27\u0166")
        buf.write("\13\27\3\27\5\27\u0169\n\27\3\30\3\30\3\30\3\30\3\30\3")
        buf.write("\30\3\30\3\30\3\30\3\30\5\30\u0175\n\30\3\31\3\31\3\32")
        buf.write("\3\32\3\33\3\33\3\34\3\34\3\35\3\35\3\36\3\36\3\37\3\37")
        buf.write("\3 \3 \3!\3!\3\"\3\"\3#\3#\3$\3$\3$\2\3\24%\2\4\6\b\n")
        buf.write("\f\16\20\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\668:<")
        buf.write(">@BDF\2\n\4\2\17\17\24\24\3\2$)\3\2+,\3\2-\60\3\2\61\65")
        buf.write("\5\2,,\63\63\66\67\3\2=@\3\2:<\2\u01a7\2H\3\2\2\2\4N\3")
        buf.write("\2\2\2\6\u00a1\3\2\2\2\b\u00a3\3\2\2\2\n\u00aa\3\2\2\2")
        buf.write("\f\u00ae\3\2\2\2\16\u00ba\3\2\2\2\20\u00c2\3\2\2\2\22")
        buf.write("\u00ca\3\2\2\2\24\u00df\3\2\2\2\26\u0106\3\2\2\2\30\u010d")
        buf.write("\3\2\2\2\32\u0118\3\2\2\2\34\u0120\3\2\2\2\36\u012b\3")
        buf.write("\2\2\2 \u0138\3\2\2\2\"\u0143\3\2\2\2$\u0145\3\2\2\2&")
        buf.write("\u0148\3\2\2\2(\u0156\3\2\2\2*\u0158\3\2\2\2,\u015e\3")
        buf.write("\2\2\2.\u0174\3\2\2\2\60\u0176\3\2\2\2\62\u0178\3\2\2")
        buf.write("\2\64\u017a\3\2\2\2\66\u017c\3\2\2\28\u017e\3\2\2\2:\u0180")
        buf.write("\3\2\2\2<\u0182\3\2\2\2>\u0184\3\2\2\2@\u0186\3\2\2\2")
        buf.write("B\u0188\3\2\2\2D\u018a\3\2\2\2F\u018c\3\2\2\2HI\5\4\3")
        buf.write("\2IJ\7\2\2\3J\3\3\2\2\2KM\5\6\4\2LK\3\2\2\2MP\3\2\2\2")
        buf.write("NL\3\2\2\2NO\3\2\2\2OR\3\2\2\2PN\3\2\2\2QS\5\b\5\2RQ\3")
        buf.write("\2\2\2RS\3\2\2\2S\5\3\2\2\2TU\5\16\b\2UV\7\3\2\2VW\5\22")
        buf.write("\n\2W\u00a2\3\2\2\2X\u00a2\5\30\r\2Y\u00a2\7\4\2\2Z[\7")
        buf.write("\5\2\2[\\\5\4\3\2\\]\7\6\2\2]\u00a2\3\2\2\2^_\7\7\2\2")
        buf.write("_`\5\24\13\2`a\7\5\2\2ab\5\4\3\2bc\7\6\2\2c\u00a2\3\2")
        buf.write("\2\2de\7\b\2\2ef\5\4\3\2fg\7\t\2\2gh\5\24\13\2h\u00a2")
        buf.write("\3\2\2\2ij\7\n\2\2jk\5\24\13\2kl\7\13\2\2lt\5\4\3\2mn")
        buf.write("\7\f\2\2no\5\24\13\2op\7\13\2\2pq\5\4\3\2qs\3\2\2\2rm")
        buf.write("\3\2\2\2sv\3\2\2\2tr\3\2\2\2tu\3\2\2\2uy\3\2\2\2vt\3\2")
        buf.write("\2\2wx\7\r\2\2xz\5\4\3\2yw\3\2\2\2yz\3\2\2\2z{\3\2\2\2")
        buf.write("{|\7\6\2\2|\u00a2\3\2\2\2}~\7\16\2\2~\177\79\2\2\177\u0080")
        buf.write("\7\3\2\2\u0080\u0081\5\24\13\2\u0081\u0082\7\17\2\2\u0082")
        buf.write("\u0085\5\24\13\2\u0083\u0084\7\17\2\2\u0084\u0086\5\24")
        buf.write("\13\2\u0085\u0083\3\2\2\2\u0085\u0086\3\2\2\2\u0086\u0087")
        buf.write("\3\2\2\2\u0087\u0088\7\5\2\2\u0088\u0089\5\4\3\2\u0089")
        buf.write("\u008a\7\6\2\2\u008a\u00a2\3\2\2\2\u008b\u008c\7\16\2")
        buf.write("\2\u008c\u008d\5\20\t\2\u008d\u008e\7\20\2\2\u008e\u008f")
        buf.write("\5\22\n\2\u008f\u0090\7\5\2\2\u0090\u0091\5\4\3\2\u0091")
        buf.write("\u0092\7\6\2\2\u0092\u00a2\3\2\2\2\u0093\u0094\7\21\2")
        buf.write("\2\u0094\u0095\5\f\7\2\u0095\u0096\5&\24\2\u0096\u00a2")
        buf.write("\3\2\2\2\u0097\u0098\7\22\2\2\u0098\u0099\7\21\2\2\u0099")
        buf.write("\u009a\79\2\2\u009a\u00a2\5&\24\2\u009b\u009c\7\22\2\2")
        buf.write("\u009c\u009f\5\20\t\2\u009d\u009e\7\3\2\2\u009e\u00a0")
        buf.write("\5\22\n\2\u009f\u009d\3\2\2\2\u009f\u00a0\3\2\2\2\u00a0")
        buf.write("\u00a2\3\2\2\2\u00a1T\3\2\2\2\u00a1X\3\2\2\2\u00a1Y\3")
        buf.write("\2\2\2\u00a1Z\3\2\2\2\u00a1^\3\2\2\2\u00a1d\3\2\2\2\u00a1")
        buf.write("i\3\2\2\2\u00a1}\3\2\2\2\u00a1\u008b\3\2\2\2\u00a1\u0093")
        buf.write("\3\2\2\2\u00a1\u0097\3\2\2\2\u00a1\u009b\3\2\2\2\u00a2")
        buf.write("\7\3\2\2\2\u00a3\u00a5\7\23\2\2\u00a4\u00a6\5\22\n\2\u00a5")
        buf.write("\u00a4\3\2\2\2\u00a5\u00a6\3\2\2\2\u00a6\u00a8\3\2\2\2")
        buf.write("\u00a7\u00a9\7\24\2\2\u00a8\u00a7\3\2\2\2\u00a8\u00a9")
        buf.write("\3\2\2\2\u00a9\t\3\2\2\2\u00aa\u00ab\7\25\2\2\u00ab\u00ac")
        buf.write("\79\2\2\u00ac\u00ad\7\25\2\2\u00ad\13\3\2\2\2\u00ae\u00b3")
        buf.write("\79\2\2\u00af\u00b0\7\26\2\2\u00b0\u00b2\79\2\2\u00b1")
        buf.write("\u00af\3\2\2\2\u00b2\u00b5\3\2\2\2\u00b3\u00b1\3\2\2\2")
        buf.write("\u00b3\u00b4\3\2\2\2\u00b4\u00b8\3\2\2\2\u00b5\u00b3\3")
        buf.write("\2\2\2\u00b6\u00b7\7\27\2\2\u00b7\u00b9\79\2\2\u00b8\u00b6")
        buf.write("\3\2\2\2\u00b8\u00b9\3\2\2\2\u00b9\r\3\2\2\2\u00ba\u00bf")
        buf.write("\5\34\17\2\u00bb\u00bc\7\17\2\2\u00bc\u00be\5\34\17\2")
        buf.write("\u00bd\u00bb\3\2\2\2\u00be\u00c1\3\2\2\2\u00bf\u00bd\3")
        buf.write("\2\2\2\u00bf\u00c0\3\2\2\2\u00c0\17\3\2\2\2\u00c1\u00bf")
        buf.write("\3\2\2\2\u00c2\u00c7\79\2\2\u00c3\u00c4\7\17\2\2\u00c4")
        buf.write("\u00c6\79\2\2\u00c5\u00c3\3\2\2\2\u00c6\u00c9\3\2\2\2")
        buf.write("\u00c7\u00c5\3\2\2\2\u00c7\u00c8\3\2\2\2\u00c8\21\3\2")
        buf.write("\2\2\u00c9\u00c7\3\2\2\2\u00ca\u00cf\5\24\13\2\u00cb\u00cc")
        buf.write("\7\17\2\2\u00cc\u00ce\5\24\13\2\u00cd\u00cb\3\2\2\2\u00ce")
        buf.write("\u00d1\3\2\2\2\u00cf\u00cd\3\2\2\2\u00cf\u00d0\3\2\2\2")
        buf.write("\u00d0\23\3\2\2\2\u00d1\u00cf\3\2\2\2\u00d2\u00d3\b\13")
        buf.write("\1\2\u00d3\u00e0\7\30\2\2\u00d4\u00e0\7\31\2\2\u00d5\u00e0")
        buf.write("\7\32\2\2\u00d6\u00e0\5D#\2\u00d7\u00e0\5F$\2\u00d8\u00e0")
        buf.write("\7\33\2\2\u00d9\u00e0\5$\23\2\u00da\u00e0\5\26\f\2\u00db")
        buf.write("\u00e0\5*\26\2\u00dc\u00dd\5@!\2\u00dd\u00de\5\24\13\n")
        buf.write("\u00de\u00e0\3\2\2\2\u00df\u00d2\3\2\2\2\u00df\u00d4\3")
        buf.write("\2\2\2\u00df\u00d5\3\2\2\2\u00df\u00d6\3\2\2\2\u00df\u00d7")
        buf.write("\3\2\2\2\u00df\u00d8\3\2\2\2\u00df\u00d9\3\2\2\2\u00df")
        buf.write("\u00da\3\2\2\2\u00df\u00db\3\2\2\2\u00df\u00dc\3\2\2\2")
        buf.write("\u00e0\u0103\3\2\2\2\u00e1\u00e2\f\13\2\2\u00e2\u00e3")
        buf.write("\5B\"\2\u00e3\u00e4\5\24\13\13\u00e4\u0102\3\2\2\2\u00e5")
        buf.write("\u00e6\f\t\2\2\u00e6\u00e7\5<\37\2\u00e7\u00e8\5\24\13")
        buf.write("\n\u00e8\u0102\3\2\2\2\u00e9\u00ea\f\b\2\2\u00ea\u00eb")
        buf.write("\5:\36\2\u00eb\u00ec\5\24\13\t\u00ec\u0102\3\2\2\2\u00ed")
        buf.write("\u00ee\f\7\2\2\u00ee\u00ef\58\35\2\u00ef\u00f0\5\24\13")
        buf.write("\7\u00f0\u0102\3\2\2\2\u00f1\u00f2\f\6\2\2\u00f2\u00f3")
        buf.write("\5\66\34\2\u00f3\u00f4\5\24\13\7\u00f4\u0102\3\2\2\2\u00f5")
        buf.write("\u00f6\f\5\2\2\u00f6\u00f7\5\64\33\2\u00f7\u00f8\5\24")
        buf.write("\13\6\u00f8\u0102\3\2\2\2\u00f9\u00fa\f\4\2\2\u00fa\u00fb")
        buf.write("\5\62\32\2\u00fb\u00fc\5\24\13\5\u00fc\u0102\3\2\2\2\u00fd")
        buf.write("\u00fe\f\3\2\2\u00fe\u00ff\5> \2\u00ff\u0100\5\24\13\4")
        buf.write("\u0100\u0102\3\2\2\2\u0101\u00e1\3\2\2\2\u0101\u00e5\3")
        buf.write("\2\2\2\u0101\u00e9\3\2\2\2\u0101\u00ed\3\2\2\2\u0101\u00f1")
        buf.write("\3\2\2\2\u0101\u00f5\3\2\2\2\u0101\u00f9\3\2\2\2\u0101")
        buf.write("\u00fd\3\2\2\2\u0102\u0105\3\2\2\2\u0103\u0101\3\2\2\2")
        buf.write("\u0103\u0104\3\2\2\2\u0104\25\3\2\2\2\u0105\u0103\3\2")
        buf.write("\2\2\u0106\u010a\5\32\16\2\u0107\u0109\5 \21\2\u0108\u0107")
        buf.write("\3\2\2\2\u0109\u010c\3\2\2\2\u010a\u0108\3\2\2\2\u010a")
        buf.write("\u010b\3\2\2\2\u010b\27\3\2\2\2\u010c\u010a\3\2\2\2\u010d")
        buf.write("\u010f\5\32\16\2\u010e\u0110\5 \21\2\u010f\u010e\3\2\2")
        buf.write("\2\u0110\u0111\3\2\2\2\u0111\u010f\3\2\2\2\u0111\u0112")
        buf.write("\3\2\2\2\u0112\31\3\2\2\2\u0113\u0119\5\34\17\2\u0114")
        buf.write("\u0115\7\34\2\2\u0115\u0116\5\24\13\2\u0116\u0117\7\35")
        buf.write("\2\2\u0117\u0119\3\2\2\2\u0118\u0113\3\2\2\2\u0118\u0114")
        buf.write("\3\2\2\2\u0119\33\3\2\2\2\u011a\u0121\79\2\2\u011b\u011c")
        buf.write("\7\34\2\2\u011c\u011d\5\24\13\2\u011d\u011e\7\35\2\2\u011e")
        buf.write("\u011f\5\36\20\2\u011f\u0121\3\2\2\2\u0120\u011a\3\2\2")
        buf.write("\2\u0120\u011b\3\2\2\2\u0121\u0125\3\2\2\2\u0122\u0124")
        buf.write("\5\36\20\2\u0123\u0122\3\2\2\2\u0124\u0127\3\2\2\2\u0125")
        buf.write("\u0123\3\2\2\2\u0125\u0126\3\2\2\2\u0126\35\3\2\2\2\u0127")
        buf.write("\u0125\3\2\2\2\u0128\u012a\5 \21\2\u0129\u0128\3\2\2\2")
        buf.write("\u012a\u012d\3\2\2\2\u012b\u0129\3\2\2\2\u012b\u012c\3")
        buf.write("\2\2\2\u012c\u0134\3\2\2\2\u012d\u012b\3\2\2\2\u012e\u012f")
        buf.write("\7\36\2\2\u012f\u0130\5\24\13\2\u0130\u0131\7\37\2\2\u0131")
        buf.write("\u0135\3\2\2\2\u0132\u0133\7\26\2\2\u0133\u0135\79\2\2")
        buf.write("\u0134\u012e\3\2\2\2\u0134\u0132\3\2\2\2\u0135\37\3\2")
        buf.write("\2\2\u0136\u0137\7\27\2\2\u0137\u0139\79\2\2\u0138\u0136")
        buf.write("\3\2\2\2\u0138\u0139\3\2\2\2\u0139\u013a\3\2\2\2\u013a")
        buf.write("\u013b\5\"\22\2\u013b!\3\2\2\2\u013c\u013e\7\34\2\2\u013d")
        buf.write("\u013f\5\22\n\2\u013e\u013d\3\2\2\2\u013e\u013f\3\2\2")
        buf.write("\2\u013f\u0140\3\2\2\2\u0140\u0144\7\35\2\2\u0141\u0144")
        buf.write("\5*\26\2\u0142\u0144\5F$\2\u0143\u013c\3\2\2\2\u0143\u0141")
        buf.write("\3\2\2\2\u0143\u0142\3\2\2\2\u0144#\3\2\2\2\u0145\u0146")
        buf.write("\7\21\2\2\u0146\u0147\5&\24\2\u0147%\3\2\2\2\u0148\u014a")
        buf.write("\7\34\2\2\u0149\u014b\5(\25\2\u014a\u0149\3\2\2\2\u014a")
        buf.write("\u014b\3\2\2\2\u014b\u014c\3\2\2\2\u014c\u014d\7\35\2")
        buf.write("\2\u014d\u014e\5\4\3\2\u014e\u014f\7\6\2\2\u014f\'\3\2")
        buf.write("\2\2\u0150\u0153\5\20\t\2\u0151\u0152\7\17\2\2\u0152\u0154")
        buf.write("\7\33\2\2\u0153\u0151\3\2\2\2\u0153\u0154\3\2\2\2\u0154")
        buf.write("\u0157\3\2\2\2\u0155\u0157\7\33\2\2\u0156\u0150\3\2\2")
        buf.write("\2\u0156\u0155\3\2\2\2\u0157)\3\2\2\2\u0158\u015a\7 \2")
        buf.write("\2\u0159\u015b\5,\27\2\u015a\u0159\3\2\2\2\u015a\u015b")
        buf.write("\3\2\2\2\u015b\u015c\3\2\2\2\u015c\u015d\7!\2\2\u015d")
        buf.write("+\3\2\2\2\u015e\u0164\5.\30\2\u015f\u0160\5\60\31\2\u0160")
        buf.write("\u0161\5.\30\2\u0161\u0163\3\2\2\2\u0162\u015f\3\2\2\2")
        buf.write("\u0163\u0166\3\2\2\2\u0164\u0162\3\2\2\2\u0164\u0165\3")
        buf.write("\2\2\2\u0165\u0168\3\2\2\2\u0166\u0164\3\2\2\2\u0167\u0169")
        buf.write("\5\60\31\2\u0168\u0167\3\2\2\2\u0168\u0169\3\2\2\2\u0169")
        buf.write("-\3\2\2\2\u016a\u016b\7\36\2\2\u016b\u016c\5\24\13\2\u016c")
        buf.write("\u016d\7\37\2\2\u016d\u016e\7\3\2\2\u016e\u016f\5\24\13")
        buf.write("\2\u016f\u0175\3\2\2\2\u0170\u0171\79\2\2\u0171\u0172")
        buf.write("\7\3\2\2\u0172\u0175\5\24\13\2\u0173\u0175\5\24\13\2\u0174")
        buf.write("\u016a\3\2\2\2\u0174\u0170\3\2\2\2\u0174\u0173\3\2\2\2")
        buf.write("\u0175/\3\2\2\2\u0176\u0177\t\2\2\2\u0177\61\3\2\2\2\u0178")
        buf.write("\u0179\7\"\2\2\u0179\63\3\2\2\2\u017a\u017b\7#\2\2\u017b")
        buf.write("\65\3\2\2\2\u017c\u017d\t\3\2\2\u017d\67\3\2\2\2\u017e")
        buf.write("\u017f\7*\2\2\u017f9\3\2\2\2\u0180\u0181\t\4\2\2\u0181")
        buf.write(";\3\2\2\2\u0182\u0183\t\5\2\2\u0183=\3\2\2\2\u0184\u0185")
        buf.write("\t\6\2\2\u0185?\3\2\2\2\u0186\u0187\t\7\2\2\u0187A\3\2")
        buf.write("\2\2\u0188\u0189\78\2\2\u0189C\3\2\2\2\u018a\u018b\t\b")
        buf.write("\2\2\u018bE\3\2\2\2\u018c\u018d\t\t\2\2\u018dG\3\2\2\2")
        buf.write("$NRty\u0085\u009f\u00a1\u00a5\u00a8\u00b3\u00b8\u00bf")
        buf.write("\u00c7\u00cf\u00df\u0101\u0103\u010a\u0111\u0118\u0120")
        buf.write("\u0125\u012b\u0134\u0138\u013e\u0143\u014a\u0153\u0156")
        buf.write("\u015a\u0164\u0168\u0174")
        return buf.getvalue()


class LuaParser ( Parser ):

    grammarFileName = "Lua.g4"

    atn = ATNDeserializer().deserialize(serializedATN())

    decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ]

    sharedContextCache = PredictionContextCache()

    literalNames = [ "<INVALID>", "'='", "'break'", "'do'", "'end'", "'while'", 
                     "'repeat'", "'until'", "'if'", "'then'", "'elseif'", 
                     "'else'", "'for'", "','", "'in'", "'function'", "'local'", 
                     "'return'", "';'", "'::'", "'.'", "':'", "'nil'", "'false'", 
                     "'true'", "'...'", "'('", "')'", "'['", "']'", "'{'", 
                     "'}'", "'or'", "'and'", "'<'", "'>'", "'<='", "'>='", 
                     "'~='", "'=='", "'..'", "'+'", "'-'", "'*'", "'/'", 
                     "'%'", "'//'", "'&'", "'|'", "'~'", "'<<'", "'>>'", 
                     "'not'", "'#'", "'^'" ]

    symbolicNames = [ "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                      "<INVALID>", "<INVALID>", "<INVALID>", "NAME", "NORMALSTRING", 
                      "CHARSTRING", "LONGSTRING", "INT", "HEX", "FLOAT", 
                      "HEX_FLOAT", "COMMENT", "LINE_COMMENT", "WS", "SHEBANG" ]

    RULE_chunk = 0
    RULE_block = 1
    RULE_stat = 2
    RULE_retstat = 3
    RULE_label = 4
    RULE_funcname = 5
    RULE_varlist = 6
    RULE_namelist = 7
    RULE_explist = 8
    RULE_exp = 9
    RULE_prefixexp = 10
    RULE_functioncall = 11
    RULE_varOrExp = 12
    RULE_var = 13
    RULE_varSuffix = 14
    RULE_nameAndArgs = 15
    RULE_args = 16
    RULE_functiondef = 17
    RULE_funcbody = 18
    RULE_parlist = 19
    RULE_tableconstructor = 20
    RULE_fieldlist = 21
    RULE_field = 22
    RULE_fieldsep = 23
    RULE_operatorOr = 24
    RULE_operatorAnd = 25
    RULE_operatorComparison = 26
    RULE_operatorStrcat = 27
    RULE_operatorAddSub = 28
    RULE_operatorMulDivMod = 29
    RULE_operatorBitwise = 30
    RULE_operatorUnary = 31
    RULE_operatorPower = 32
    RULE_number = 33
    RULE_string = 34

    ruleNames =  [ "chunk", "block", "stat", "retstat", "label", "funcname", 
                   "varlist", "namelist", "explist", "exp", "prefixexp", 
                   "functioncall", "varOrExp", "var", "varSuffix", "nameAndArgs", 
                   "args", "functiondef", "funcbody", "parlist", "tableconstructor", 
                   "fieldlist", "field", "fieldsep", "operatorOr", "operatorAnd", 
                   "operatorComparison", "operatorStrcat", "operatorAddSub", 
                   "operatorMulDivMod", "operatorBitwise", "operatorUnary", 
                   "operatorPower", "number", "string" ]

    EOF = Token.EOF
    T__0=1
    T__1=2
    T__2=3
    T__3=4
    T__4=5
    T__5=6
    T__6=7
    T__7=8
    T__8=9
    T__9=10
    T__10=11
    T__11=12
    T__12=13
    T__13=14
    T__14=15
    T__15=16
    T__16=17
    T__17=18
    T__18=19
    T__19=20
    T__20=21
    T__21=22
    T__22=23
    T__23=24
    T__24=25
    T__25=26
    T__26=27
    T__27=28
    T__28=29
    T__29=30
    T__30=31
    T__31=32
    T__32=33
    T__33=34
    T__34=35
    T__35=36
    T__36=37
    T__37=38
    T__38=39
    T__39=40
    T__40=41
    T__41=42
    T__42=43
    T__43=44
    T__44=45
    T__45=46
    T__46=47
    T__47=48
    T__48=49
    T__49=50
    T__50=51
    T__51=52
    T__52=53
    T__53=54
    NAME=55
    NORMALSTRING=56
    CHARSTRING=57
    LONGSTRING=58
    INT=59
    HEX=60
    FLOAT=61
    HEX_FLOAT=62
    COMMENT=63
    LINE_COMMENT=64
    WS=65
    SHEBANG=66

    def __init__(self, input:TokenStream, output:TextIO = sys.stdout):
        super().__init__(input, output)
        self.checkVersion("4.7")
        self._interp = ParserATNSimulator(self, self.atn, self.decisionsToDFA, self.sharedContextCache)
        self._predicates = None



    class ChunkContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def block(self):
            return self.getTypedRuleContext(LuaParser.BlockContext,0)


        def EOF(self):
            return self.getToken(LuaParser.EOF, 0)

        def getRuleIndex(self):
            return LuaParser.RULE_chunk

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterChunk" ):
                listener.enterChunk(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitChunk" ):
                listener.exitChunk(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitChunk" ):
                return visitor.visitChunk(self)
            else:
                return visitor.visitChildren(self)




    def chunk(self):

        localctx = LuaParser.ChunkContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_chunk)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 70
            self.block()
            self.state = 71
            self.match(LuaParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class BlockContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def stat(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LuaParser.StatContext)
            else:
                return self.getTypedRuleContext(LuaParser.StatContext,i)


        def retstat(self):
            return self.getTypedRuleContext(LuaParser.RetstatContext,0)


        def getRuleIndex(self):
            return LuaParser.RULE_block

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterBlock" ):
                listener.enterBlock(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitBlock" ):
                listener.exitBlock(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitBlock" ):
                return visitor.visitBlock(self)
            else:
                return visitor.visitChildren(self)




    def block(self):

        localctx = LuaParser.BlockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_block)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 76
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LuaParser.T__1) | (1 << LuaParser.T__2) | (1 << LuaParser.T__4) | (1 << LuaParser.T__5) | (1 << LuaParser.T__7) | (1 << LuaParser.T__11) | (1 << LuaParser.T__14) | (1 << LuaParser.T__15) | (1 << LuaParser.T__25) | (1 << LuaParser.NAME))) != 0):
                self.state = 73
                self.stat()
                self.state = 78
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 80
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==LuaParser.T__16:
                self.state = 79
                self.retstat()


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class StatContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser


        def getRuleIndex(self):
            return LuaParser.RULE_stat

     
        def copyFrom(self, ctx:ParserRuleContext):
            super().copyFrom(ctx)



    class WhileLoopContext(StatContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a LuaParser.StatContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def exp(self):
            return self.getTypedRuleContext(LuaParser.ExpContext,0)

        def block(self):
            return self.getTypedRuleContext(LuaParser.BlockContext,0)


        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterWhileLoop" ):
                listener.enterWhileLoop(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitWhileLoop" ):
                listener.exitWhileLoop(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitWhileLoop" ):
                return visitor.visitWhileLoop(self)
            else:
                return visitor.visitChildren(self)


    class ForIterationContext(StatContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a LuaParser.StatContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def namelist(self):
            return self.getTypedRuleContext(LuaParser.NamelistContext,0)

        def explist(self):
            return self.getTypedRuleContext(LuaParser.ExplistContext,0)

        def block(self):
            return self.getTypedRuleContext(LuaParser.BlockContext,0)


        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterForIteration" ):
                listener.enterForIteration(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitForIteration" ):
                listener.exitForIteration(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitForIteration" ):
                return visitor.visitForIteration(self)
            else:
                return visitor.visitChildren(self)


    class LocalFunctionDefinationContext(StatContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a LuaParser.StatContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def NAME(self):
            return self.getToken(LuaParser.NAME, 0)
        def funcbody(self):
            return self.getTypedRuleContext(LuaParser.FuncbodyContext,0)


        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterLocalFunctionDefination" ):
                listener.enterLocalFunctionDefination(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitLocalFunctionDefination" ):
                listener.exitLocalFunctionDefination(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitLocalFunctionDefination" ):
                return visitor.visitLocalFunctionDefination(self)
            else:
                return visitor.visitChildren(self)


    class RepeatLoopContext(StatContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a LuaParser.StatContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def block(self):
            return self.getTypedRuleContext(LuaParser.BlockContext,0)

        def exp(self):
            return self.getTypedRuleContext(LuaParser.ExpContext,0)


        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterRepeatLoop" ):
                listener.enterRepeatLoop(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitRepeatLoop" ):
                listener.exitRepeatLoop(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitRepeatLoop" ):
                return visitor.visitRepeatLoop(self)
            else:
                return visitor.visitChildren(self)


    class BreakContext(StatContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a LuaParser.StatContext
            super().__init__(parser)
            self.copyFrom(ctx)


        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterBreak" ):
                listener.enterBreak(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitBreak" ):
                listener.exitBreak(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitBreak" ):
                return visitor.visitBreak(self)
            else:
                return visitor.visitChildren(self)


    class AssignmentContext(StatContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a LuaParser.StatContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def varlist(self):
            return self.getTypedRuleContext(LuaParser.VarlistContext,0)

        def explist(self):
            return self.getTypedRuleContext(LuaParser.ExplistContext,0)


        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterAssignment" ):
                listener.enterAssignment(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitAssignment" ):
                listener.exitAssignment(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitAssignment" ):
                return visitor.visitAssignment(self)
            else:
                return visitor.visitChildren(self)


    class DoBlockContext(StatContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a LuaParser.StatContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def block(self):
            return self.getTypedRuleContext(LuaParser.BlockContext,0)


        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterDoBlock" ):
                listener.enterDoBlock(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitDoBlock" ):
                listener.exitDoBlock(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitDoBlock" ):
                return visitor.visitDoBlock(self)
            else:
                return visitor.visitChildren(self)


    class LocalAssignmentContext(StatContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a LuaParser.StatContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def namelist(self):
            return self.getTypedRuleContext(LuaParser.NamelistContext,0)

        def explist(self):
            return self.getTypedRuleContext(LuaParser.ExplistContext,0)


        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterLocalAssignment" ):
                listener.enterLocalAssignment(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitLocalAssignment" ):
                listener.exitLocalAssignment(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitLocalAssignment" ):
                return visitor.visitLocalAssignment(self)
            else:
                return visitor.visitChildren(self)


    class FunctionDefinationContext(StatContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a LuaParser.StatContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def funcname(self):
            return self.getTypedRuleContext(LuaParser.FuncnameContext,0)

        def funcbody(self):
            return self.getTypedRuleContext(LuaParser.FuncbodyContext,0)


        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterFunctionDefination" ):
                listener.enterFunctionDefination(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitFunctionDefination" ):
                listener.exitFunctionDefination(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitFunctionDefination" ):
                return visitor.visitFunctionDefination(self)
            else:
                return visitor.visitChildren(self)


    class ForLoopContext(StatContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a LuaParser.StatContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def NAME(self):
            return self.getToken(LuaParser.NAME, 0)
        def exp(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LuaParser.ExpContext)
            else:
                return self.getTypedRuleContext(LuaParser.ExpContext,i)

        def block(self):
            return self.getTypedRuleContext(LuaParser.BlockContext,0)


        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterForLoop" ):
                listener.enterForLoop(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitForLoop" ):
                listener.exitForLoop(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitForLoop" ):
                return visitor.visitForLoop(self)
            else:
                return visitor.visitChildren(self)


    class IfBlockContext(StatContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a LuaParser.StatContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def exp(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LuaParser.ExpContext)
            else:
                return self.getTypedRuleContext(LuaParser.ExpContext,i)

        def block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LuaParser.BlockContext)
            else:
                return self.getTypedRuleContext(LuaParser.BlockContext,i)


        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterIfBlock" ):
                listener.enterIfBlock(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitIfBlock" ):
                listener.exitIfBlock(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitIfBlock" ):
                return visitor.visitIfBlock(self)
            else:
                return visitor.visitChildren(self)


    class FunctionCallContext(StatContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a LuaParser.StatContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def functioncall(self):
            return self.getTypedRuleContext(LuaParser.FunctioncallContext,0)


        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterFunctionCall" ):
                listener.enterFunctionCall(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitFunctionCall" ):
                listener.exitFunctionCall(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitFunctionCall" ):
                return visitor.visitFunctionCall(self)
            else:
                return visitor.visitChildren(self)



    def stat(self):

        localctx = LuaParser.StatContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_stat)
        self._la = 0 # Token type
        try:
            self.state = 159
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,6,self._ctx)
            if la_ == 1:
                localctx = LuaParser.AssignmentContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 82
                self.varlist()
                self.state = 83
                self.match(LuaParser.T__0)
                self.state = 84
                self.explist()
                pass

            elif la_ == 2:
                localctx = LuaParser.FunctionCallContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 86
                self.functioncall()
                pass

            elif la_ == 3:
                localctx = LuaParser.BreakContext(self, localctx)
                self.enterOuterAlt(localctx, 3)
                self.state = 87
                self.match(LuaParser.T__1)
                pass

            elif la_ == 4:
                localctx = LuaParser.DoBlockContext(self, localctx)
                self.enterOuterAlt(localctx, 4)
                self.state = 88
                self.match(LuaParser.T__2)
                self.state = 89
                self.block()
                self.state = 90
                self.match(LuaParser.T__3)
                pass

            elif la_ == 5:
                localctx = LuaParser.WhileLoopContext(self, localctx)
                self.enterOuterAlt(localctx, 5)
                self.state = 92
                self.match(LuaParser.T__4)
                self.state = 93
                self.exp(0)
                self.state = 94
                self.match(LuaParser.T__2)
                self.state = 95
                self.block()
                self.state = 96
                self.match(LuaParser.T__3)
                pass

            elif la_ == 6:
                localctx = LuaParser.RepeatLoopContext(self, localctx)
                self.enterOuterAlt(localctx, 6)
                self.state = 98
                self.match(LuaParser.T__5)
                self.state = 99
                self.block()
                self.state = 100
                self.match(LuaParser.T__6)
                self.state = 101
                self.exp(0)
                pass

            elif la_ == 7:
                localctx = LuaParser.IfBlockContext(self, localctx)
                self.enterOuterAlt(localctx, 7)
                self.state = 103
                self.match(LuaParser.T__7)
                self.state = 104
                self.exp(0)
                self.state = 105
                self.match(LuaParser.T__8)
                self.state = 106
                self.block()
                self.state = 114
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==LuaParser.T__9:
                    self.state = 107
                    self.match(LuaParser.T__9)
                    self.state = 108
                    self.exp(0)
                    self.state = 109
                    self.match(LuaParser.T__8)
                    self.state = 110
                    self.block()
                    self.state = 116
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 119
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==LuaParser.T__10:
                    self.state = 117
                    self.match(LuaParser.T__10)
                    self.state = 118
                    self.block()


                self.state = 121
                self.match(LuaParser.T__3)
                pass

            elif la_ == 8:
                localctx = LuaParser.ForLoopContext(self, localctx)
                self.enterOuterAlt(localctx, 8)
                self.state = 123
                self.match(LuaParser.T__11)
                self.state = 124
                self.match(LuaParser.NAME)
                self.state = 125
                self.match(LuaParser.T__0)
                self.state = 126
                self.exp(0)
                self.state = 127
                self.match(LuaParser.T__12)
                self.state = 128
                self.exp(0)
                self.state = 131
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==LuaParser.T__12:
                    self.state = 129
                    self.match(LuaParser.T__12)
                    self.state = 130
                    self.exp(0)


                self.state = 133
                self.match(LuaParser.T__2)
                self.state = 134
                self.block()
                self.state = 135
                self.match(LuaParser.T__3)
                pass

            elif la_ == 9:
                localctx = LuaParser.ForIterationContext(self, localctx)
                self.enterOuterAlt(localctx, 9)
                self.state = 137
                self.match(LuaParser.T__11)
                self.state = 138
                self.namelist()
                self.state = 139
                self.match(LuaParser.T__13)
                self.state = 140
                self.explist()
                self.state = 141
                self.match(LuaParser.T__2)
                self.state = 142
                self.block()
                self.state = 143
                self.match(LuaParser.T__3)
                pass

            elif la_ == 10:
                localctx = LuaParser.FunctionDefinationContext(self, localctx)
                self.enterOuterAlt(localctx, 10)
                self.state = 145
                self.match(LuaParser.T__14)
                self.state = 146
                self.funcname()
                self.state = 147
                self.funcbody()
                pass

            elif la_ == 11:
                localctx = LuaParser.LocalFunctionDefinationContext(self, localctx)
                self.enterOuterAlt(localctx, 11)
                self.state = 149
                self.match(LuaParser.T__15)
                self.state = 150
                self.match(LuaParser.T__14)
                self.state = 151
                self.match(LuaParser.NAME)
                self.state = 152
                self.funcbody()
                pass

            elif la_ == 12:
                localctx = LuaParser.LocalAssignmentContext(self, localctx)
                self.enterOuterAlt(localctx, 12)
                self.state = 153
                self.match(LuaParser.T__15)
                self.state = 154
                self.namelist()
                self.state = 157
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==LuaParser.T__0:
                    self.state = 155
                    self.match(LuaParser.T__0)
                    self.state = 156
                    self.explist()


                pass


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class RetstatContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def explist(self):
            return self.getTypedRuleContext(LuaParser.ExplistContext,0)


        def getRuleIndex(self):
            return LuaParser.RULE_retstat

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterRetstat" ):
                listener.enterRetstat(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitRetstat" ):
                listener.exitRetstat(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitRetstat" ):
                return visitor.visitRetstat(self)
            else:
                return visitor.visitChildren(self)




    def retstat(self):

        localctx = LuaParser.RetstatContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_retstat)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 161
            self.match(LuaParser.T__16)
            self.state = 163
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LuaParser.T__14) | (1 << LuaParser.T__21) | (1 << LuaParser.T__22) | (1 << LuaParser.T__23) | (1 << LuaParser.T__24) | (1 << LuaParser.T__25) | (1 << LuaParser.T__29) | (1 << LuaParser.T__41) | (1 << LuaParser.T__48) | (1 << LuaParser.T__51) | (1 << LuaParser.T__52) | (1 << LuaParser.NAME) | (1 << LuaParser.NORMALSTRING) | (1 << LuaParser.CHARSTRING) | (1 << LuaParser.LONGSTRING) | (1 << LuaParser.INT) | (1 << LuaParser.HEX) | (1 << LuaParser.FLOAT) | (1 << LuaParser.HEX_FLOAT))) != 0):
                self.state = 162
                self.explist()


            self.state = 166
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==LuaParser.T__17:
                self.state = 165
                self.match(LuaParser.T__17)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class LabelContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def NAME(self):
            return self.getToken(LuaParser.NAME, 0)

        def getRuleIndex(self):
            return LuaParser.RULE_label

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterLabel" ):
                listener.enterLabel(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitLabel" ):
                listener.exitLabel(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitLabel" ):
                return visitor.visitLabel(self)
            else:
                return visitor.visitChildren(self)




    def label(self):

        localctx = LuaParser.LabelContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_label)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 168
            self.match(LuaParser.T__18)
            self.state = 169
            self.match(LuaParser.NAME)
            self.state = 170
            self.match(LuaParser.T__18)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class FuncnameContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def NAME(self, i:int=None):
            if i is None:
                return self.getTokens(LuaParser.NAME)
            else:
                return self.getToken(LuaParser.NAME, i)

        def getRuleIndex(self):
            return LuaParser.RULE_funcname

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterFuncname" ):
                listener.enterFuncname(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitFuncname" ):
                listener.exitFuncname(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitFuncname" ):
                return visitor.visitFuncname(self)
            else:
                return visitor.visitChildren(self)




    def funcname(self):

        localctx = LuaParser.FuncnameContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_funcname)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 172
            self.match(LuaParser.NAME)
            self.state = 177
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==LuaParser.T__19:
                self.state = 173
                self.match(LuaParser.T__19)
                self.state = 174
                self.match(LuaParser.NAME)
                self.state = 179
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 182
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==LuaParser.T__20:
                self.state = 180
                self.match(LuaParser.T__20)
                self.state = 181
                self.match(LuaParser.NAME)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class VarlistContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def var(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LuaParser.VarContext)
            else:
                return self.getTypedRuleContext(LuaParser.VarContext,i)


        def getRuleIndex(self):
            return LuaParser.RULE_varlist

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterVarlist" ):
                listener.enterVarlist(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitVarlist" ):
                listener.exitVarlist(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitVarlist" ):
                return visitor.visitVarlist(self)
            else:
                return visitor.visitChildren(self)




    def varlist(self):

        localctx = LuaParser.VarlistContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_varlist)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 184
            self.var()
            self.state = 189
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==LuaParser.T__12:
                self.state = 185
                self.match(LuaParser.T__12)
                self.state = 186
                self.var()
                self.state = 191
                self._errHandler.sync(self)
                _la = self._input.LA(1)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class NamelistContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def NAME(self, i:int=None):
            if i is None:
                return self.getTokens(LuaParser.NAME)
            else:
                return self.getToken(LuaParser.NAME, i)

        def getRuleIndex(self):
            return LuaParser.RULE_namelist

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterNamelist" ):
                listener.enterNamelist(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitNamelist" ):
                listener.exitNamelist(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitNamelist" ):
                return visitor.visitNamelist(self)
            else:
                return visitor.visitChildren(self)




    def namelist(self):

        localctx = LuaParser.NamelistContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_namelist)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 192
            self.match(LuaParser.NAME)
            self.state = 197
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,12,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 193
                    self.match(LuaParser.T__12)
                    self.state = 194
                    self.match(LuaParser.NAME) 
                self.state = 199
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,12,self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class ExplistContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def exp(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LuaParser.ExpContext)
            else:
                return self.getTypedRuleContext(LuaParser.ExpContext,i)


        def getRuleIndex(self):
            return LuaParser.RULE_explist

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterExplist" ):
                listener.enterExplist(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitExplist" ):
                listener.exitExplist(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitExplist" ):
                return visitor.visitExplist(self)
            else:
                return visitor.visitChildren(self)




    def explist(self):

        localctx = LuaParser.ExplistContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_explist)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 200
            self.exp(0)
            self.state = 205
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==LuaParser.T__12:
                self.state = 201
                self.match(LuaParser.T__12)
                self.state = 202
                self.exp(0)
                self.state = 207
                self._errHandler.sync(self)
                _la = self._input.LA(1)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class ExpContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser


        def getRuleIndex(self):
            return LuaParser.RULE_exp

     
        def copyFrom(self, ctx:ParserRuleContext):
            super().copyFrom(ctx)


    class StringLiteralContext(ExpContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a LuaParser.ExpContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def string(self):
            return self.getTypedRuleContext(LuaParser.StringContext,0)


        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterStringLiteral" ):
                listener.enterStringLiteral(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitStringLiteral" ):
                listener.exitStringLiteral(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitStringLiteral" ):
                return visitor.visitStringLiteral(self)
            else:
                return visitor.visitChildren(self)


    class OperationUnaryContext(ExpContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a LuaParser.ExpContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def operatorUnary(self):
            return self.getTypedRuleContext(LuaParser.OperatorUnaryContext,0)

        def exp(self):
            return self.getTypedRuleContext(LuaParser.ExpContext,0)


        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterOperationUnary" ):
                listener.enterOperationUnary(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitOperationUnary" ):
                listener.exitOperationUnary(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitOperationUnary" ):
                return visitor.visitOperationUnary(self)
            else:
                return visitor.visitChildren(self)


    class OperationAddSubContext(ExpContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a LuaParser.ExpContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def exp(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LuaParser.ExpContext)
            else:
                return self.getTypedRuleContext(LuaParser.ExpContext,i)

        def operatorAddSub(self):
            return self.getTypedRuleContext(LuaParser.OperatorAddSubContext,0)


        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterOperationAddSub" ):
                listener.enterOperationAddSub(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitOperationAddSub" ):
                listener.exitOperationAddSub(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitOperationAddSub" ):
                return visitor.visitOperationAddSub(self)
            else:
                return visitor.visitChildren(self)


    class FalseLiteralContext(ExpContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a LuaParser.ExpContext
            super().__init__(parser)
            self.copyFrom(ctx)


        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterFalseLiteral" ):
                listener.enterFalseLiteral(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitFalseLiteral" ):
                listener.exitFalseLiteral(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitFalseLiteral" ):
                return visitor.visitFalseLiteral(self)
            else:
                return visitor.visitChildren(self)


    class DotDotDotContext(ExpContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a LuaParser.ExpContext
            super().__init__(parser)
            self.copyFrom(ctx)


        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterDotDotDot" ):
                listener.enterDotDotDot(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitDotDotDot" ):
                listener.exitDotDotDot(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitDotDotDot" ):
                return visitor.visitDotDotDot(self)
            else:
                return visitor.visitChildren(self)


    class NilLiteralContext(ExpContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a LuaParser.ExpContext
            super().__init__(parser)
            self.copyFrom(ctx)


        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterNilLiteral" ):
                listener.enterNilLiteral(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitNilLiteral" ):
                listener.exitNilLiteral(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitNilLiteral" ):
                return visitor.visitNilLiteral(self)
            else:
                return visitor.visitChildren(self)


    class OperationBitwiseContext(ExpContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a LuaParser.ExpContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def exp(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LuaParser.ExpContext)
            else:
                return self.getTypedRuleContext(LuaParser.ExpContext,i)

        def operatorBitwise(self):
            return self.getTypedRuleContext(LuaParser.OperatorBitwiseContext,0)


        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterOperationBitwise" ):
                listener.enterOperationBitwise(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitOperationBitwise" ):
                listener.exitOperationBitwise(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitOperationBitwise" ):
                return visitor.visitOperationBitwise(self)
            else:
                return visitor.visitChildren(self)


    class OperationStrcatContext(ExpContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a LuaParser.ExpContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def exp(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LuaParser.ExpContext)
            else:
                return self.getTypedRuleContext(LuaParser.ExpContext,i)

        def operatorStrcat(self):
            return self.getTypedRuleContext(LuaParser.OperatorStrcatContext,0)


        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterOperationStrcat" ):
                listener.enterOperationStrcat(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitOperationStrcat" ):
                listener.exitOperationStrcat(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitOperationStrcat" ):
                return visitor.visitOperationStrcat(self)
            else:
                return visitor.visitChildren(self)


    class NumberLiteralContext(ExpContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a LuaParser.ExpContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def number(self):
            return self.getTypedRuleContext(LuaParser.NumberContext,0)


        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterNumberLiteral" ):
                listener.enterNumberLiteral(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitNumberLiteral" ):
                listener.exitNumberLiteral(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitNumberLiteral" ):
                return visitor.visitNumberLiteral(self)
            else:
                return visitor.visitChildren(self)


    class OperationComparisionContext(ExpContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a LuaParser.ExpContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def exp(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LuaParser.ExpContext)
            else:
                return self.getTypedRuleContext(LuaParser.ExpContext,i)

        def operatorComparison(self):
            return self.getTypedRuleContext(LuaParser.OperatorComparisonContext,0)


        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterOperationComparision" ):
                listener.enterOperationComparision(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitOperationComparision" ):
                listener.exitOperationComparision(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitOperationComparision" ):
                return visitor.visitOperationComparision(self)
            else:
                return visitor.visitChildren(self)


    class AnymousFunctionContext(ExpContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a LuaParser.ExpContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def functiondef(self):
            return self.getTypedRuleContext(LuaParser.FunctiondefContext,0)


        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterAnymousFunction" ):
                listener.enterAnymousFunction(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitAnymousFunction" ):
                listener.exitAnymousFunction(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitAnymousFunction" ):
                return visitor.visitAnymousFunction(self)
            else:
                return visitor.visitChildren(self)


    class OperationAndContext(ExpContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a LuaParser.ExpContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def exp(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LuaParser.ExpContext)
            else:
                return self.getTypedRuleContext(LuaParser.ExpContext,i)

        def operatorAnd(self):
            return self.getTypedRuleContext(LuaParser.OperatorAndContext,0)


        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterOperationAnd" ):
                listener.enterOperationAnd(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitOperationAnd" ):
                listener.exitOperationAnd(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitOperationAnd" ):
                return visitor.visitOperationAnd(self)
            else:
                return visitor.visitChildren(self)


    class TrueLiteralContext(ExpContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a LuaParser.ExpContext
            super().__init__(parser)
            self.copyFrom(ctx)


        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterTrueLiteral" ):
                listener.enterTrueLiteral(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitTrueLiteral" ):
                listener.exitTrueLiteral(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitTrueLiteral" ):
                return visitor.visitTrueLiteral(self)
            else:
                return visitor.visitChildren(self)


    class PrefixExpContext(ExpContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a LuaParser.ExpContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def prefixexp(self):
            return self.getTypedRuleContext(LuaParser.PrefixexpContext,0)


        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterPrefixExp" ):
                listener.enterPrefixExp(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitPrefixExp" ):
                listener.exitPrefixExp(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitPrefixExp" ):
                return visitor.visitPrefixExp(self)
            else:
                return visitor.visitChildren(self)


    class OperationMulDivContext(ExpContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a LuaParser.ExpContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def exp(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LuaParser.ExpContext)
            else:
                return self.getTypedRuleContext(LuaParser.ExpContext,i)

        def operatorMulDivMod(self):
            return self.getTypedRuleContext(LuaParser.OperatorMulDivModContext,0)


        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterOperationMulDiv" ):
                listener.enterOperationMulDiv(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitOperationMulDiv" ):
                listener.exitOperationMulDiv(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitOperationMulDiv" ):
                return visitor.visitOperationMulDiv(self)
            else:
                return visitor.visitChildren(self)


    class TableConstructorContext(ExpContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a LuaParser.ExpContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def tableconstructor(self):
            return self.getTypedRuleContext(LuaParser.TableconstructorContext,0)


        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterTableConstructor" ):
                listener.enterTableConstructor(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitTableConstructor" ):
                listener.exitTableConstructor(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitTableConstructor" ):
                return visitor.visitTableConstructor(self)
            else:
                return visitor.visitChildren(self)


    class OperationPowerContext(ExpContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a LuaParser.ExpContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def exp(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LuaParser.ExpContext)
            else:
                return self.getTypedRuleContext(LuaParser.ExpContext,i)

        def operatorPower(self):
            return self.getTypedRuleContext(LuaParser.OperatorPowerContext,0)


        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterOperationPower" ):
                listener.enterOperationPower(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitOperationPower" ):
                listener.exitOperationPower(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitOperationPower" ):
                return visitor.visitOperationPower(self)
            else:
                return visitor.visitChildren(self)


    class OperationOrContext(ExpContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a LuaParser.ExpContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def exp(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LuaParser.ExpContext)
            else:
                return self.getTypedRuleContext(LuaParser.ExpContext,i)

        def operatorOr(self):
            return self.getTypedRuleContext(LuaParser.OperatorOrContext,0)


        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterOperationOr" ):
                listener.enterOperationOr(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitOperationOr" ):
                listener.exitOperationOr(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitOperationOr" ):
                return visitor.visitOperationOr(self)
            else:
                return visitor.visitChildren(self)



    def exp(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = LuaParser.ExpContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 18
        self.enterRecursionRule(localctx, 18, self.RULE_exp, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 221
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LuaParser.T__21]:
                localctx = LuaParser.NilLiteralContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx

                self.state = 209
                self.match(LuaParser.T__21)
                pass
            elif token in [LuaParser.T__22]:
                localctx = LuaParser.FalseLiteralContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 210
                self.match(LuaParser.T__22)
                pass
            elif token in [LuaParser.T__23]:
                localctx = LuaParser.TrueLiteralContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 211
                self.match(LuaParser.T__23)
                pass
            elif token in [LuaParser.INT, LuaParser.HEX, LuaParser.FLOAT, LuaParser.HEX_FLOAT]:
                localctx = LuaParser.NumberLiteralContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 212
                self.number()
                pass
            elif token in [LuaParser.NORMALSTRING, LuaParser.CHARSTRING, LuaParser.LONGSTRING]:
                localctx = LuaParser.StringLiteralContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 213
                self.string()
                pass
            elif token in [LuaParser.T__24]:
                localctx = LuaParser.DotDotDotContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 214
                self.match(LuaParser.T__24)
                pass
            elif token in [LuaParser.T__14]:
                localctx = LuaParser.AnymousFunctionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 215
                self.functiondef()
                pass
            elif token in [LuaParser.T__25, LuaParser.NAME]:
                localctx = LuaParser.PrefixExpContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 216
                self.prefixexp()
                pass
            elif token in [LuaParser.T__29]:
                localctx = LuaParser.TableConstructorContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 217
                self.tableconstructor()
                pass
            elif token in [LuaParser.T__41, LuaParser.T__48, LuaParser.T__51, LuaParser.T__52]:
                localctx = LuaParser.OperationUnaryContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 218
                self.operatorUnary()
                self.state = 219
                self.exp(8)
                pass
            else:
                raise NoViableAltException(self)

            self._ctx.stop = self._input.LT(-1)
            self.state = 257
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,16,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    self.state = 255
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,15,self._ctx)
                    if la_ == 1:
                        localctx = LuaParser.OperationPowerContext(self, LuaParser.ExpContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_exp)
                        self.state = 223
                        if not self.precpred(self._ctx, 9):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 9)")
                        self.state = 224
                        self.operatorPower()
                        self.state = 225
                        self.exp(9)
                        pass

                    elif la_ == 2:
                        localctx = LuaParser.OperationMulDivContext(self, LuaParser.ExpContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_exp)
                        self.state = 227
                        if not self.precpred(self._ctx, 7):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 7)")
                        self.state = 228
                        self.operatorMulDivMod()
                        self.state = 229
                        self.exp(8)
                        pass

                    elif la_ == 3:
                        localctx = LuaParser.OperationAddSubContext(self, LuaParser.ExpContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_exp)
                        self.state = 231
                        if not self.precpred(self._ctx, 6):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 6)")
                        self.state = 232
                        self.operatorAddSub()
                        self.state = 233
                        self.exp(7)
                        pass

                    elif la_ == 4:
                        localctx = LuaParser.OperationStrcatContext(self, LuaParser.ExpContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_exp)
                        self.state = 235
                        if not self.precpred(self._ctx, 5):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 5)")
                        self.state = 236
                        self.operatorStrcat()
                        self.state = 237
                        self.exp(5)
                        pass

                    elif la_ == 5:
                        localctx = LuaParser.OperationComparisionContext(self, LuaParser.ExpContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_exp)
                        self.state = 239
                        if not self.precpred(self._ctx, 4):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 4)")
                        self.state = 240
                        self.operatorComparison()
                        self.state = 241
                        self.exp(5)
                        pass

                    elif la_ == 6:
                        localctx = LuaParser.OperationAndContext(self, LuaParser.ExpContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_exp)
                        self.state = 243
                        if not self.precpred(self._ctx, 3):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 3)")
                        self.state = 244
                        self.operatorAnd()
                        self.state = 245
                        self.exp(4)
                        pass

                    elif la_ == 7:
                        localctx = LuaParser.OperationOrContext(self, LuaParser.ExpContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_exp)
                        self.state = 247
                        if not self.precpred(self._ctx, 2):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 2)")
                        self.state = 248
                        self.operatorOr()
                        self.state = 249
                        self.exp(3)
                        pass

                    elif la_ == 8:
                        localctx = LuaParser.OperationBitwiseContext(self, LuaParser.ExpContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_exp)
                        self.state = 251
                        if not self.precpred(self._ctx, 1):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 1)")
                        self.state = 252
                        self.operatorBitwise()
                        self.state = 253
                        self.exp(2)
                        pass

             
                self.state = 259
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,16,self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.unrollRecursionContexts(_parentctx)
        return localctx

    class PrefixexpContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def varOrExp(self):
            return self.getTypedRuleContext(LuaParser.VarOrExpContext,0)


        def nameAndArgs(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LuaParser.NameAndArgsContext)
            else:
                return self.getTypedRuleContext(LuaParser.NameAndArgsContext,i)


        def getRuleIndex(self):
            return LuaParser.RULE_prefixexp

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterPrefixexp" ):
                listener.enterPrefixexp(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitPrefixexp" ):
                listener.exitPrefixexp(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitPrefixexp" ):
                return visitor.visitPrefixexp(self)
            else:
                return visitor.visitChildren(self)




    def prefixexp(self):

        localctx = LuaParser.PrefixexpContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_prefixexp)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 260
            self.varOrExp()
            self.state = 264
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,17,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 261
                    self.nameAndArgs() 
                self.state = 266
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,17,self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class FunctioncallContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def varOrExp(self):
            return self.getTypedRuleContext(LuaParser.VarOrExpContext,0)


        def nameAndArgs(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LuaParser.NameAndArgsContext)
            else:
                return self.getTypedRuleContext(LuaParser.NameAndArgsContext,i)


        def getRuleIndex(self):
            return LuaParser.RULE_functioncall

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterFunctioncall" ):
                listener.enterFunctioncall(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitFunctioncall" ):
                listener.exitFunctioncall(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitFunctioncall" ):
                return visitor.visitFunctioncall(self)
            else:
                return visitor.visitChildren(self)




    def functioncall(self):

        localctx = LuaParser.FunctioncallContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_functioncall)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 267
            self.varOrExp()
            self.state = 269 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 268
                    self.nameAndArgs()

                else:
                    raise NoViableAltException(self)
                self.state = 271 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,18,self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class VarOrExpContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def var(self):
            return self.getTypedRuleContext(LuaParser.VarContext,0)


        def exp(self):
            return self.getTypedRuleContext(LuaParser.ExpContext,0)


        def getRuleIndex(self):
            return LuaParser.RULE_varOrExp

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterVarOrExp" ):
                listener.enterVarOrExp(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitVarOrExp" ):
                listener.exitVarOrExp(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitVarOrExp" ):
                return visitor.visitVarOrExp(self)
            else:
                return visitor.visitChildren(self)




    def varOrExp(self):

        localctx = LuaParser.VarOrExpContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_varOrExp)
        try:
            self.state = 278
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,19,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 273
                self.var()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 274
                self.match(LuaParser.T__25)
                self.state = 275
                self.exp(0)
                self.state = 276
                self.match(LuaParser.T__26)
                pass


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class VarContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def NAME(self):
            return self.getToken(LuaParser.NAME, 0)

        def exp(self):
            return self.getTypedRuleContext(LuaParser.ExpContext,0)


        def varSuffix(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LuaParser.VarSuffixContext)
            else:
                return self.getTypedRuleContext(LuaParser.VarSuffixContext,i)


        def getRuleIndex(self):
            return LuaParser.RULE_var

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterVar" ):
                listener.enterVar(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitVar" ):
                listener.exitVar(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitVar" ):
                return visitor.visitVar(self)
            else:
                return visitor.visitChildren(self)




    def var(self):

        localctx = LuaParser.VarContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_var)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 286
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LuaParser.NAME]:
                self.state = 280
                self.match(LuaParser.NAME)
                pass
            elif token in [LuaParser.T__25]:
                self.state = 281
                self.match(LuaParser.T__25)
                self.state = 282
                self.exp(0)
                self.state = 283
                self.match(LuaParser.T__26)
                self.state = 284
                self.varSuffix()
                pass
            else:
                raise NoViableAltException(self)

            self.state = 291
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,21,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 288
                    self.varSuffix() 
                self.state = 293
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,21,self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class VarSuffixContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def exp(self):
            return self.getTypedRuleContext(LuaParser.ExpContext,0)


        def NAME(self):
            return self.getToken(LuaParser.NAME, 0)

        def nameAndArgs(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LuaParser.NameAndArgsContext)
            else:
                return self.getTypedRuleContext(LuaParser.NameAndArgsContext,i)


        def getRuleIndex(self):
            return LuaParser.RULE_varSuffix

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterVarSuffix" ):
                listener.enterVarSuffix(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitVarSuffix" ):
                listener.exitVarSuffix(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitVarSuffix" ):
                return visitor.visitVarSuffix(self)
            else:
                return visitor.visitChildren(self)




    def varSuffix(self):

        localctx = LuaParser.VarSuffixContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_varSuffix)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 297
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LuaParser.T__20) | (1 << LuaParser.T__25) | (1 << LuaParser.T__29) | (1 << LuaParser.NORMALSTRING) | (1 << LuaParser.CHARSTRING) | (1 << LuaParser.LONGSTRING))) != 0):
                self.state = 294
                self.nameAndArgs()
                self.state = 299
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 306
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LuaParser.T__27]:
                self.state = 300
                self.match(LuaParser.T__27)
                self.state = 301
                self.exp(0)
                self.state = 302
                self.match(LuaParser.T__28)
                pass
            elif token in [LuaParser.T__19]:
                self.state = 304
                self.match(LuaParser.T__19)
                self.state = 305
                self.match(LuaParser.NAME)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class NameAndArgsContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def args(self):
            return self.getTypedRuleContext(LuaParser.ArgsContext,0)


        def NAME(self):
            return self.getToken(LuaParser.NAME, 0)

        def getRuleIndex(self):
            return LuaParser.RULE_nameAndArgs

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterNameAndArgs" ):
                listener.enterNameAndArgs(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitNameAndArgs" ):
                listener.exitNameAndArgs(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitNameAndArgs" ):
                return visitor.visitNameAndArgs(self)
            else:
                return visitor.visitChildren(self)




    def nameAndArgs(self):

        localctx = LuaParser.NameAndArgsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_nameAndArgs)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 310
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==LuaParser.T__20:
                self.state = 308
                self.match(LuaParser.T__20)
                self.state = 309
                self.match(LuaParser.NAME)


            self.state = 312
            self.args()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class ArgsContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def explist(self):
            return self.getTypedRuleContext(LuaParser.ExplistContext,0)


        def tableconstructor(self):
            return self.getTypedRuleContext(LuaParser.TableconstructorContext,0)


        def string(self):
            return self.getTypedRuleContext(LuaParser.StringContext,0)


        def getRuleIndex(self):
            return LuaParser.RULE_args

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterArgs" ):
                listener.enterArgs(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitArgs" ):
                listener.exitArgs(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitArgs" ):
                return visitor.visitArgs(self)
            else:
                return visitor.visitChildren(self)




    def args(self):

        localctx = LuaParser.ArgsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_args)
        self._la = 0 # Token type
        try:
            self.state = 321
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LuaParser.T__25]:
                self.enterOuterAlt(localctx, 1)
                self.state = 314
                self.match(LuaParser.T__25)
                self.state = 316
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LuaParser.T__14) | (1 << LuaParser.T__21) | (1 << LuaParser.T__22) | (1 << LuaParser.T__23) | (1 << LuaParser.T__24) | (1 << LuaParser.T__25) | (1 << LuaParser.T__29) | (1 << LuaParser.T__41) | (1 << LuaParser.T__48) | (1 << LuaParser.T__51) | (1 << LuaParser.T__52) | (1 << LuaParser.NAME) | (1 << LuaParser.NORMALSTRING) | (1 << LuaParser.CHARSTRING) | (1 << LuaParser.LONGSTRING) | (1 << LuaParser.INT) | (1 << LuaParser.HEX) | (1 << LuaParser.FLOAT) | (1 << LuaParser.HEX_FLOAT))) != 0):
                    self.state = 315
                    self.explist()


                self.state = 318
                self.match(LuaParser.T__26)
                pass
            elif token in [LuaParser.T__29]:
                self.enterOuterAlt(localctx, 2)
                self.state = 319
                self.tableconstructor()
                pass
            elif token in [LuaParser.NORMALSTRING, LuaParser.CHARSTRING, LuaParser.LONGSTRING]:
                self.enterOuterAlt(localctx, 3)
                self.state = 320
                self.string()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class FunctiondefContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def funcbody(self):
            return self.getTypedRuleContext(LuaParser.FuncbodyContext,0)


        def getRuleIndex(self):
            return LuaParser.RULE_functiondef

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterFunctiondef" ):
                listener.enterFunctiondef(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitFunctiondef" ):
                listener.exitFunctiondef(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitFunctiondef" ):
                return visitor.visitFunctiondef(self)
            else:
                return visitor.visitChildren(self)




    def functiondef(self):

        localctx = LuaParser.FunctiondefContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_functiondef)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 323
            self.match(LuaParser.T__14)
            self.state = 324
            self.funcbody()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class FuncbodyContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def block(self):
            return self.getTypedRuleContext(LuaParser.BlockContext,0)


        def parlist(self):
            return self.getTypedRuleContext(LuaParser.ParlistContext,0)


        def getRuleIndex(self):
            return LuaParser.RULE_funcbody

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterFuncbody" ):
                listener.enterFuncbody(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitFuncbody" ):
                listener.exitFuncbody(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitFuncbody" ):
                return visitor.visitFuncbody(self)
            else:
                return visitor.visitChildren(self)




    def funcbody(self):

        localctx = LuaParser.FuncbodyContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_funcbody)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 326
            self.match(LuaParser.T__25)
            self.state = 328
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==LuaParser.T__24 or _la==LuaParser.NAME:
                self.state = 327
                self.parlist()


            self.state = 330
            self.match(LuaParser.T__26)
            self.state = 331
            self.block()
            self.state = 332
            self.match(LuaParser.T__3)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class ParlistContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def namelist(self):
            return self.getTypedRuleContext(LuaParser.NamelistContext,0)


        def getRuleIndex(self):
            return LuaParser.RULE_parlist

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterParlist" ):
                listener.enterParlist(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitParlist" ):
                listener.exitParlist(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitParlist" ):
                return visitor.visitParlist(self)
            else:
                return visitor.visitChildren(self)




    def parlist(self):

        localctx = LuaParser.ParlistContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_parlist)
        self._la = 0 # Token type
        try:
            self.state = 340
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [LuaParser.NAME]:
                self.enterOuterAlt(localctx, 1)
                self.state = 334
                self.namelist()
                self.state = 337
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==LuaParser.T__12:
                    self.state = 335
                    self.match(LuaParser.T__12)
                    self.state = 336
                    self.match(LuaParser.T__24)


                pass
            elif token in [LuaParser.T__24]:
                self.enterOuterAlt(localctx, 2)
                self.state = 339
                self.match(LuaParser.T__24)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class TableconstructorContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def fieldlist(self):
            return self.getTypedRuleContext(LuaParser.FieldlistContext,0)


        def getRuleIndex(self):
            return LuaParser.RULE_tableconstructor

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterTableconstructor" ):
                listener.enterTableconstructor(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitTableconstructor" ):
                listener.exitTableconstructor(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitTableconstructor" ):
                return visitor.visitTableconstructor(self)
            else:
                return visitor.visitChildren(self)




    def tableconstructor(self):

        localctx = LuaParser.TableconstructorContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_tableconstructor)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 342
            self.match(LuaParser.T__29)
            self.state = 344
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LuaParser.T__14) | (1 << LuaParser.T__21) | (1 << LuaParser.T__22) | (1 << LuaParser.T__23) | (1 << LuaParser.T__24) | (1 << LuaParser.T__25) | (1 << LuaParser.T__27) | (1 << LuaParser.T__29) | (1 << LuaParser.T__41) | (1 << LuaParser.T__48) | (1 << LuaParser.T__51) | (1 << LuaParser.T__52) | (1 << LuaParser.NAME) | (1 << LuaParser.NORMALSTRING) | (1 << LuaParser.CHARSTRING) | (1 << LuaParser.LONGSTRING) | (1 << LuaParser.INT) | (1 << LuaParser.HEX) | (1 << LuaParser.FLOAT) | (1 << LuaParser.HEX_FLOAT))) != 0):
                self.state = 343
                self.fieldlist()


            self.state = 346
            self.match(LuaParser.T__30)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class FieldlistContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def field(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LuaParser.FieldContext)
            else:
                return self.getTypedRuleContext(LuaParser.FieldContext,i)


        def fieldsep(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LuaParser.FieldsepContext)
            else:
                return self.getTypedRuleContext(LuaParser.FieldsepContext,i)


        def getRuleIndex(self):
            return LuaParser.RULE_fieldlist

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterFieldlist" ):
                listener.enterFieldlist(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitFieldlist" ):
                listener.exitFieldlist(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitFieldlist" ):
                return visitor.visitFieldlist(self)
            else:
                return visitor.visitChildren(self)




    def fieldlist(self):

        localctx = LuaParser.FieldlistContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_fieldlist)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 348
            self.field()
            self.state = 354
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,31,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 349
                    self.fieldsep()
                    self.state = 350
                    self.field() 
                self.state = 356
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,31,self._ctx)

            self.state = 358
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==LuaParser.T__12 or _la==LuaParser.T__17:
                self.state = 357
                self.fieldsep()


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class FieldContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def exp(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(LuaParser.ExpContext)
            else:
                return self.getTypedRuleContext(LuaParser.ExpContext,i)


        def NAME(self):
            return self.getToken(LuaParser.NAME, 0)

        def getRuleIndex(self):
            return LuaParser.RULE_field

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterField" ):
                listener.enterField(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitField" ):
                listener.exitField(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitField" ):
                return visitor.visitField(self)
            else:
                return visitor.visitChildren(self)




    def field(self):

        localctx = LuaParser.FieldContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_field)
        try:
            self.state = 370
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,33,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 360
                self.match(LuaParser.T__27)
                self.state = 361
                self.exp(0)
                self.state = 362
                self.match(LuaParser.T__28)
                self.state = 363
                self.match(LuaParser.T__0)
                self.state = 364
                self.exp(0)
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 366
                self.match(LuaParser.NAME)
                self.state = 367
                self.match(LuaParser.T__0)
                self.state = 368
                self.exp(0)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 369
                self.exp(0)
                pass


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class FieldsepContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser


        def getRuleIndex(self):
            return LuaParser.RULE_fieldsep

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterFieldsep" ):
                listener.enterFieldsep(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitFieldsep" ):
                listener.exitFieldsep(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitFieldsep" ):
                return visitor.visitFieldsep(self)
            else:
                return visitor.visitChildren(self)




    def fieldsep(self):

        localctx = LuaParser.FieldsepContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_fieldsep)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 372
            _la = self._input.LA(1)
            if not(_la==LuaParser.T__12 or _la==LuaParser.T__17):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class OperatorOrContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser


        def getRuleIndex(self):
            return LuaParser.RULE_operatorOr

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterOperatorOr" ):
                listener.enterOperatorOr(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitOperatorOr" ):
                listener.exitOperatorOr(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitOperatorOr" ):
                return visitor.visitOperatorOr(self)
            else:
                return visitor.visitChildren(self)




    def operatorOr(self):

        localctx = LuaParser.OperatorOrContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_operatorOr)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 374
            self.match(LuaParser.T__31)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class OperatorAndContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser


        def getRuleIndex(self):
            return LuaParser.RULE_operatorAnd

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterOperatorAnd" ):
                listener.enterOperatorAnd(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitOperatorAnd" ):
                listener.exitOperatorAnd(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitOperatorAnd" ):
                return visitor.visitOperatorAnd(self)
            else:
                return visitor.visitChildren(self)




    def operatorAnd(self):

        localctx = LuaParser.OperatorAndContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_operatorAnd)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 376
            self.match(LuaParser.T__32)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class OperatorComparisonContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser


        def getRuleIndex(self):
            return LuaParser.RULE_operatorComparison

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterOperatorComparison" ):
                listener.enterOperatorComparison(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitOperatorComparison" ):
                listener.exitOperatorComparison(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitOperatorComparison" ):
                return visitor.visitOperatorComparison(self)
            else:
                return visitor.visitChildren(self)




    def operatorComparison(self):

        localctx = LuaParser.OperatorComparisonContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_operatorComparison)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 378
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LuaParser.T__33) | (1 << LuaParser.T__34) | (1 << LuaParser.T__35) | (1 << LuaParser.T__36) | (1 << LuaParser.T__37) | (1 << LuaParser.T__38))) != 0)):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class OperatorStrcatContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser


        def getRuleIndex(self):
            return LuaParser.RULE_operatorStrcat

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterOperatorStrcat" ):
                listener.enterOperatorStrcat(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitOperatorStrcat" ):
                listener.exitOperatorStrcat(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitOperatorStrcat" ):
                return visitor.visitOperatorStrcat(self)
            else:
                return visitor.visitChildren(self)




    def operatorStrcat(self):

        localctx = LuaParser.OperatorStrcatContext(self, self._ctx, self.state)
        self.enterRule(localctx, 54, self.RULE_operatorStrcat)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 380
            self.match(LuaParser.T__39)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class OperatorAddSubContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser


        def getRuleIndex(self):
            return LuaParser.RULE_operatorAddSub

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterOperatorAddSub" ):
                listener.enterOperatorAddSub(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitOperatorAddSub" ):
                listener.exitOperatorAddSub(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitOperatorAddSub" ):
                return visitor.visitOperatorAddSub(self)
            else:
                return visitor.visitChildren(self)




    def operatorAddSub(self):

        localctx = LuaParser.OperatorAddSubContext(self, self._ctx, self.state)
        self.enterRule(localctx, 56, self.RULE_operatorAddSub)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 382
            _la = self._input.LA(1)
            if not(_la==LuaParser.T__40 or _la==LuaParser.T__41):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class OperatorMulDivModContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser


        def getRuleIndex(self):
            return LuaParser.RULE_operatorMulDivMod

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterOperatorMulDivMod" ):
                listener.enterOperatorMulDivMod(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitOperatorMulDivMod" ):
                listener.exitOperatorMulDivMod(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitOperatorMulDivMod" ):
                return visitor.visitOperatorMulDivMod(self)
            else:
                return visitor.visitChildren(self)




    def operatorMulDivMod(self):

        localctx = LuaParser.OperatorMulDivModContext(self, self._ctx, self.state)
        self.enterRule(localctx, 58, self.RULE_operatorMulDivMod)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 384
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LuaParser.T__42) | (1 << LuaParser.T__43) | (1 << LuaParser.T__44) | (1 << LuaParser.T__45))) != 0)):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class OperatorBitwiseContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser


        def getRuleIndex(self):
            return LuaParser.RULE_operatorBitwise

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterOperatorBitwise" ):
                listener.enterOperatorBitwise(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitOperatorBitwise" ):
                listener.exitOperatorBitwise(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitOperatorBitwise" ):
                return visitor.visitOperatorBitwise(self)
            else:
                return visitor.visitChildren(self)




    def operatorBitwise(self):

        localctx = LuaParser.OperatorBitwiseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 60, self.RULE_operatorBitwise)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 386
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LuaParser.T__46) | (1 << LuaParser.T__47) | (1 << LuaParser.T__48) | (1 << LuaParser.T__49) | (1 << LuaParser.T__50))) != 0)):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class OperatorUnaryContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser


        def getRuleIndex(self):
            return LuaParser.RULE_operatorUnary

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterOperatorUnary" ):
                listener.enterOperatorUnary(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitOperatorUnary" ):
                listener.exitOperatorUnary(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitOperatorUnary" ):
                return visitor.visitOperatorUnary(self)
            else:
                return visitor.visitChildren(self)




    def operatorUnary(self):

        localctx = LuaParser.OperatorUnaryContext(self, self._ctx, self.state)
        self.enterRule(localctx, 62, self.RULE_operatorUnary)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 388
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LuaParser.T__41) | (1 << LuaParser.T__48) | (1 << LuaParser.T__51) | (1 << LuaParser.T__52))) != 0)):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class OperatorPowerContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser


        def getRuleIndex(self):
            return LuaParser.RULE_operatorPower

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterOperatorPower" ):
                listener.enterOperatorPower(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitOperatorPower" ):
                listener.exitOperatorPower(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitOperatorPower" ):
                return visitor.visitOperatorPower(self)
            else:
                return visitor.visitChildren(self)




    def operatorPower(self):

        localctx = LuaParser.OperatorPowerContext(self, self._ctx, self.state)
        self.enterRule(localctx, 64, self.RULE_operatorPower)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 390
            self.match(LuaParser.T__53)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class NumberContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def INT(self):
            return self.getToken(LuaParser.INT, 0)

        def HEX(self):
            return self.getToken(LuaParser.HEX, 0)

        def FLOAT(self):
            return self.getToken(LuaParser.FLOAT, 0)

        def HEX_FLOAT(self):
            return self.getToken(LuaParser.HEX_FLOAT, 0)

        def getRuleIndex(self):
            return LuaParser.RULE_number

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterNumber" ):
                listener.enterNumber(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitNumber" ):
                listener.exitNumber(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitNumber" ):
                return visitor.visitNumber(self)
            else:
                return visitor.visitChildren(self)




    def number(self):

        localctx = LuaParser.NumberContext(self, self._ctx, self.state)
        self.enterRule(localctx, 66, self.RULE_number)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 392
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LuaParser.INT) | (1 << LuaParser.HEX) | (1 << LuaParser.FLOAT) | (1 << LuaParser.HEX_FLOAT))) != 0)):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx

    class StringContext(ParserRuleContext):

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def NORMALSTRING(self):
            return self.getToken(LuaParser.NORMALSTRING, 0)

        def CHARSTRING(self):
            return self.getToken(LuaParser.CHARSTRING, 0)

        def LONGSTRING(self):
            return self.getToken(LuaParser.LONGSTRING, 0)

        def getRuleIndex(self):
            return LuaParser.RULE_string

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterString" ):
                listener.enterString(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitString" ):
                listener.exitString(self)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitString" ):
                return visitor.visitString(self)
            else:
                return visitor.visitChildren(self)




    def string(self):

        localctx = LuaParser.StringContext(self, self._ctx, self.state)
        self.enterRule(localctx, 68, self.RULE_string)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 394
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << LuaParser.NORMALSTRING) | (1 << LuaParser.CHARSTRING) | (1 << LuaParser.LONGSTRING))) != 0)):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx



    def sempred(self, localctx:RuleContext, ruleIndex:int, predIndex:int):
        if self._predicates == None:
            self._predicates = dict()
        self._predicates[9] = self.exp_sempred
        pred = self._predicates.get(ruleIndex, None)
        if pred is None:
            raise Exception("No predicate with index:" + str(ruleIndex))
        else:
            return pred(localctx, predIndex)

    def exp_sempred(self, localctx:ExpContext, predIndex:int):
            if predIndex == 0:
                return self.precpred(self._ctx, 9)
         

            if predIndex == 1:
                return self.precpred(self._ctx, 7)
         

            if predIndex == 2:
                return self.precpred(self._ctx, 6)
         

            if predIndex == 3:
                return self.precpred(self._ctx, 5)
         

            if predIndex == 4:
                return self.precpred(self._ctx, 4)
         

            if predIndex == 5:
                return self.precpred(self._ctx, 3)
         

            if predIndex == 6:
                return self.precpred(self._ctx, 2)
         

            if predIndex == 7:
                return self.precpred(self._ctx, 1)
         




